<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%@include file="/common/common.jsp" %>
    <%--<link rel="stylesheet" href="${basePath}/css/layerPage.css${VERSION}"/>--%>
    <style type="text/css">
        .pre1, pre{
            margin-bottom: 0px;
            padding-bottom: 0px;
            padding-top: 0px;
            border: 0px;
            background-color: inherit;
        }
        /*#processInfo_img{
            width: 600px;
        }*/
    </style>

</head>
<body>

<div class="page-content">
    <div class="page-content-area">
        <div class="row">
            <div class="col-sm-11">
                <div class="tabbable">
                    <ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
                        <%--<li class="active">
                            <a data-toggle="tab" href="#workInfo">审批信息</a>
                        </li>--%>
                        <li>
                            <a href="#">审批信息</a>
                        </li>
                        <%--<li>
                            <a data-toggle="tab" href="#processInfo" onclick="modStop()">审批流信息</a>
                        </li>--%>
                    </ul>



                    <!--  -->
                    <div id="pageWidth" class="tab-content" style="line-height: 0px;" >
                        <div id="workInfo" class="tab-pane in active">
                        </div>

                        <div id="processInfo" class="tab-pane in active">
                            <img id="processInfo_img" src="${basePath}/statistics/show?instanceId=${instanceId}" width="100%">
                            <h3 class="header smaller lighter blue">
                                流程处理轨迹
                            </h3>

                            <table id="grid-table" style="width:100%;"></table>
                            <%--<div id="grid-pager"></div>--%>
                        </div>

                    </div>

                </div><!-- tabbable -->
            </div>
        </div><!-- row -->
    </div><!-- page-content-area -->
</div><!-- page-content -->
</body>
<!-- page specific plugin scripts -->
<script src="${basePath}/plugins/jqGrid/jquery.jqGrid.min.js${VERSION}"></script>
<script src="${basePath}/plugins/jqGrid/grid.locale-cn.js${VERSION}"></script>

<script type="text/javascript">
    $.ajaxSetup ({
        cache: false //关闭AJAX相应的缓存
    });

    $(function () {
        CommonUtils.grid({
            url: "${basePath}/statistics/findTaskHis?instanceId=${instanceId}",
            multiselect: false,
            colNames: [/*'序号',*/'任务ID',  '环节', '节点处理人', '处理意见', '是否同意', '处理时间'],
            <%--postData: {--%>
                <%--instanceId: '${instanceId}'--%>
            <%--},--%>
            colModel: [
                /*{name: 'rowNumber', index: 'rowNumber'},*/
                {name: 'taskId', index: 'taskId', width: 20},
                {name: 'taskName', index: 'taskName', width: 50},
                {name: 'taskUserName', index: 'taskUserName', width: 30},
                /*{name: 'dealUserName', index: 'dealUserName', width: 80},*/
                {name: 'dealMindInfo', index: 'dealMindInfo', width: 80},
                {name: 'isAgree', index: 'isAgree', width: 20, formatter: function (value, row, index) {
                    if(value != null && value != ""){
                        if(value == '1'){
                            return "同意";
                        }else if(value == '0'){
                            return "不同意";
                        }
                    }
                    return "";
                }},
                /*{name: 'createDate', index: 'createDate', width: 40,
                    formatter: function(value, row, index){
                        return new Date(value).formatYMD("yyyy-MM-dd HH:mm:ss");
                    }
                },*/
                {name: 'createDate', index: 'createDate', width: 40, formatter: CommonUtils.formateDate}
            ]
        });

        $(window).on('resize', function () {
            var width = $("#pageWidth").width();
            $('#grid-table').setGridWidth(width);
        });

    });

</script>

</html>